﻿namespace Wicresoft.Busi.Entity
{
    using System.Configuration;
    using Wicresoft.Framework.Organization;
    using System;

    public class MeetingRoles
    {
        private static Guid _apply = Guid.Empty;
        private static Guid _approve = Guid.Empty;
        private static Guid _deptManage = Guid.Empty;
        private static Guid _manage = Guid.Empty;
        private static Guid _MeetingReg = Guid.Empty;
        private static Guid _MeetingView = Guid.Empty;
        private static Guid _proxy = Guid.Empty;
        private static Guid _register = Guid.Empty;

        // Properties
        public static Guid Apply
        {
            get
            {
                if (_apply == Guid.Empty) _apply = OrganizationPublicHelper.GetRoleInfo("Busi.RBJRoomApply", new Guid(ConfigurationManager.AppSettings["WSAF.ApplicationID"])).ID;
                return _apply;
            }
        }

        public static Guid Approve
        {
            get
            {
                if (_approve == Guid.Empty) _approve = OrganizationPublicHelper.GetRoleInfo("Busi.RBJRoomApprove", new Guid(ConfigurationManager.AppSettings["WSAF.ApplicationID"])).ID;
                return _approve;
            }
        }

        public static Guid DeptManage
        {
            get
            {
                if (_deptManage == Guid.Empty) _deptManage = OrganizationPublicHelper.GetRoleInfo("Busi.RBJRoomDeptManage", new Guid(ConfigurationManager.AppSettings["WSAF.ApplicationID"])).ID;
                return _deptManage;
            }
        }

        public static Guid Manage
        {
            get
            {
                if (_manage == Guid.Empty) _manage = OrganizationPublicHelper.GetRoleInfo("Busi.RBJRoomManage", new Guid(ConfigurationManager.AppSettings["WSAF.ApplicationID"])).ID;
                return _manage;
            }
        }

        public static Guid MeetingReg
        {
            get
            {
                if (_MeetingReg == Guid.Empty) _MeetingReg = OrganizationPublicHelper.GetRoleInfo("Busi.RBJMeetingReg", new Guid(ConfigurationManager.AppSettings["WSAF.ApplicationID"])).ID;
                return _MeetingReg;
            }
        }

        public static Guid MeetingView
        {
            get
            {
                if (_MeetingView == Guid.Empty) _MeetingView = OrganizationPublicHelper.GetRoleInfo("Busi.RBJMeetingView", new Guid(ConfigurationManager.AppSettings["WSAF.ApplicationID"])).ID;
                return _MeetingView;
            }
        }

        public static Guid Proxy
        {
            get
            {
                if (_proxy == Guid.Empty) _proxy = OrganizationPublicHelper.GetRoleInfo("Busi.RBJRoomManageProxy", new Guid(ConfigurationManager.AppSettings["WSAF.ApplicationID"])).ID;
                return _proxy;
            }
        }

        public static Guid Register
        {
            get
            {
                if (_register == Guid.Empty) _register = OrganizationPublicHelper.GetRoleInfo("Busi.RBJRoomUseRegi", new Guid(ConfigurationManager.AppSettings["WSAF.ApplicationID"])).ID;
                return _register;
            }
        }

    }
}

